package com.ecommerce.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 优惠券领取表
 *
 * @author wang
 * @TableName t_coupon_receive
 */
@ApiModel(description = "优惠券领取表")
@Data
@TableName("t_coupon_receive")
public class CouponReceive implements Serializable {
    /**
     * 优惠券领取id
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("优惠券领取id")
    @TableId("receive_id")
    private Long receiveId;

    /**
     * 优惠券id
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("优惠券id")
    private Long couponId;

    /**
     * 领取时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("领取时间")
    private Date receiveTime;

    /**
     * 用户id
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("用户id")
    private Long userId;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("开始时间")
    private Date startTime;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("结束时间")
    private Date endTime;
    /**
     * 领取优惠券状态(0-未使用，1-已使用，2-已过期）
     */
    @ApiModelProperty("领取优惠券状态")
    private String status;

    @ApiModelProperty(hidden = true)
    private static final long serialVersionUID = 1L;

}